package edu.study.api.common.enums;

import lombok.Getter;

@Getter
public enum BaseResultCodeEnum implements BaseStrEnum {
	SUCCESS("000000", "成功"),
    FAIL("FAIL", "失败"),
    PROCESSING("PROCESSING", "处理中"),
	
    BIZ_EXCEPTION("000001", "业务异常"),
	EXCEPTION("000002", "系统异常"),
	INVALID_REQUEST_PARAM("000003", "请求参数不合法"),
	LOCK_FAIL("000004", "并发快速失败"),
	CONCURRENT_WRITE_FAIL("000005", "并发写失败"),
	DB_ERROR("DB_ERROR", "数据库执行错误"),

	PLEASE_TRY_AGAIN_LATER("PLEASE_TRY_AGAIN_LATER", "请稍候再试"),

	USER_NOT_EXIST("USER_NOT_EXIST", "用户不存在"),
	LOGIN_NAME_OR_PWD_ERROR("LOGIN_NAME_OR_PWD_ERROR","用户名或密码不正确"),
	OLD_PWD_ERROR("OLD_PWD_ERROR","原密码不正确"),

	INTERFACE_NOT_FOUND("404", "没有对应的接口"),
	RECORD_NOT_FOUND("RECORD_NOT_FOUND", "记录未找到"),
	RECORD_ALREADY_EXISTS("DATA_ALREADY_EXISTS", "数据已存在"),
	DUPLICATE_KEY_EXCEPTION("DUPLICATE_KEY_EXCEPTION", "唯一值重复"),
	OPERATE_DB_ERROR("OPERATE_DB_ERROR", "操作数据库异常"),
	NOT_ALLOWED("NOT_ALLOWED", "不允许操作"),

	TIME_OUT("TIME_OUT", "登录超时或未登录"),
	UN_VERIFY("UN_VERIFY", "企业未认证"),
	E000100("000100", "登录名与当前登录用户不一致"),
	SECURITY_CODE_ERROR("SECURITY_CODE_ERROR", "动态码验证错误"),
	UKEY_VERIFY_ERROR("UKEY_VERIFY_ERROR", "用户UKEY验签失败"),
	CORP_TYPE_ERROR("CORP_TYPE_ERROR", "用户类型错误"),
	NO_AUTH("NO_AUTH", "用户没权限"),
	BAD_GATEWAY("BAD_GATEWAY", "服务暂时不可用，请稍候再试"),
	MYSQL_ERROR("MYSQL_ERROR", "数据库出问题，请联系平台处理"),

	FILE_NOT_ALLOWED("FILE_NOT_ALLOWED", "文件格式不允许"),

	OVERRUN_TIMES("OVERRUN_TIMES", "超过次数，请稍候再试，谢谢"),

	EMAIL_SEND_OVER_INTERVAL("EMAIL_SEND_OVER_INTERVAL", "一分钟内只允许发送一次，请稍候再试"),
	EMAIL_SEND_OVER_TIMES("EMAIL_SEND_OVER_TIMES", "该邮箱收件次数太频繁，请稍候再试"),

	LOGIN_ERROR_COUNT("LOGIN_ERROR_COUNT", "登录次数达到上限，请5分钟后再试");
	;
    
    private String code;
    private String message;

	BaseResultCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
